package com.topsec.erp.util;

import org.apache.commons.lang.StringUtils;

/**
 * 类说明：http请求返回值判断
 *
 * @Idea IntelliJ IDEA
 * @Since JDK：1.8.0_102
 * @Date 2019-11-25 17:52
 * @Program erp
 * @ClassName HttpReqUtil
 * @Version V1.0
 * @Author hyq
 */
public class HttpReqUtil {

    public static boolean dealHttpInfo(String info) {
        boolean reStr = true;
        try {
            if (null != info && StringUtils.isNotEmpty(info)) {
                if (info.contains("连接超时") || info.contains("连接报错") || info.contains("响应超时")
                        || info.contains("响应报错") ) {
                    reStr = false;
                }
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
        return reStr;
    }
}
